home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / corelib / ncbilcl.msw < prev    next >
Text File  |  1996-07-05  |  6KB  |  198 lines

  1. /*   ncbilcl.h
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE
  5. *               National Center for Biotechnology Information
  6. *
  7. *  This software/database is a "United States Government Work" under the
  8. *  terms of the United States Copyright Act.  It was written as part of
  9. *  the author's official duties as a United States Government employee and
  10. *  thus cannot be copyrighted.  This software/database is freely available
  11. *  to the public for use. The National Library of Medicine and the U.S.
  12. *  Government have not placed any restriction on its use or reproduction.
  13. *
  14. *  Although all reasonable efforts have been taken to ensure the accuracy
  15. *  and reliability of the software and data, the NLM and the U.S.
  16. *  Government do not and cannot warrant the performance or results that
  17. *  may be obtained by using this software or data. The NLM and the U.S.
  18. *  Government disclaim all warranties, express or implied, including
  19. *  warranties of performance, merchantability or fitness for any particular
  20. *  purpose.
  21. *
  22. *  Please cite the author in any work or product based on this material.
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:  ncbilcl.h
  27. *
  28. * Author:  Gish, Kans, Ostell, Schuler
  29. *
  30. * Version Creation Date:   1/1/91
  31. *
  32. * $Revision: 2.12 $
  33. *
  34. * File Description:
  35. *        system dependent header
  36. *        MS Windows version
  37. *
  38. * Modifications:
  39. * --------------------------------------------------------------------------
  40. * Date       Name        Description of modification
  41. * --------  ----------  -----------------------------------------------------
  42. * 04-05-93  Schuler     Some changes for WindowsNT and DLLs
  43. * 04-12-93  Schuler     Added some #ifndef's to avoid redefinitions
  44. * 06-11-93  Schuler     Added INLINE macro (defined to __inline)
  45. *
  46. * ==========================================================================
  47. */
  48. #ifndef _NCBILCL_
  49. #define _NCBILCL_
  50.  
  51. /* PLATFORM DEFINITION FOR IBM PC UNDER MS WINDOWS */
  52.  
  53. #define COMP_MSC
  54. #define WIN_MSWIN
  55.  
  56. #ifdef WIN32
  57.  
  58. /** We'll assume OS is WindowsNT, even though it could
  59.     also be WindowsDOS + Win32s  **/
  60. #define OS_WINNT  
  61. #ifndef FAR
  62. #define FAR
  63. #define NEAR
  64. #endif
  65. #ifndef EXPORT
  66. #define EXPORT
  67. #endif
  68.  
  69. //----- Intel processor -----
  70. #if defined(X86) || defined(_X86_)
  71. #define PROC_I80X86
  72. #define PROC_I80_386
  73. #ifndef PASCAL
  74. #define PASCAL    __stdcall
  75. #define CDECL    
  76. #endif
  77. #endif    // _X86_
  78.  
  79. //----- MIPS processor -----
  80. #if defined(MIPS) || defined(_MIPS_)
  81. #define PROC_MIPS
  82. #ifndef PASCAL
  83. #define PASCAL
  84. #define CDECL
  85. #endif
  86. #endif    // _MIPS_
  87.     
  88. //----- DEC Alpha processor -----
  89. #if defined(ALPHA) || defined(_ALPHA_)
  90. #define PROC_ALPHA
  91. #define _near    //temporary
  92. #define _cdecl    //temporary
  93. #ifndef PASCAL
  94. #define PASCAL
  95. #define CDECL
  96. #endif
  97. #endif  // _APLHA_
  98.  
  99. #else
  100. // regular WindowsDOS (16-bit) definitions
  101. #ifndef WIN16
  102. #define WIN16
  103. #endif
  104. #define OS_DOS
  105. #define PROC_I80X86
  106. #ifndef PASCAL
  107. #define PASCAL    __pascal
  108. #define CDECL    __cdecl
  109. #define EXPORT  __export
  110. #endif
  111. #ifndef FAR
  112. #define FAR    __far
  113. #define NEAR    __near
  114. #endif
  115.  
  116. #endif
  117.  
  118. #if (_MSC_VER >= 700)
  119. #define INLINE __inline
  120. #endif
  121.  
  122.  
  123. /*----------------------------------------------------------------------*/
  124. /*      Desired or available feature list                               */
  125. /*----------------------------------------------------------------------*/
  126. #define TRACE_AUX    // TRACE to AUX device
  127.  
  128. /*----------------------------------------------------------------------*/
  129. /*      #includes                                                       */
  130. /*----------------------------------------------------------------------*/
  131. #include <stddef.h>
  132. #include <sys\types.h>
  133. #include <limits.h>
  134. #include <sys\stat.h>
  135. #include <stdio.h>
  136. #include <ctype.h>
  137. #include <string.h>
  138. #include <malloc.h>
  139. #include <memory.h>
  140. #include <stdlib.h>
  141. #include <math.h>
  142. #include <errno.h>
  143. #include <float.h>
  144.  
  145. /*----------------------------------------------------------------------*/
  146. /*      Missing ANSI-isms                                               */
  147. /*----------------------------------------------------------------------*/
  148. #ifndef FILENAME_MAX
  149. #define FILENAME_MAX 63
  150. #endif
  151.  
  152. /*----------------------------------------------------------------------*/
  153. /*      Aliased Logicals, Datatypes                                     */
  154. /*----------------------------------------------------------------------*/
  155. #define PNTR FAR *
  156. #define HNDL NEAR *
  157.  
  158. typedef int (FAR PASCAL *Nlm_FnPtr)();
  159. #define FnPtr           Nlm_FnPtr
  160.  
  161. /*----------------------------------------------------------------------*/
  162. /*      Misc Macros                                                     */
  163. /*----------------------------------------------------------------------*/
  164. #define PROTO(x)        x              /* Function prototypes are real */
  165. #define VPROTO(x) x   /* Prototype for variable argument list */
  166. #define DIRDELIMCHR     '\\'
  167. #define DIRDELIMSTR     "\\"
  168. #define CWDSTR          "."
  169.  
  170. #define KBYTE           (1024)
  171. #define MBYTE           (1048576L)
  172.  
  173. #define IS_LITTLE_ENDIAN
  174.  
  175. #define TEMPNAM_AVAIL
  176. #ifndef tempnam
  177. #define tempnam _tempnam
  178. #endif
  179.  
  180. /*----------------------------------------------------------------------*/
  181. /*      Macros for Floating Point                                       */
  182. /*----------------------------------------------------------------------*/
  183. #define EXP2(x) exp((x)*LN2)
  184. #define LOG2(x) (log(x)*(1./LN2))
  185. #define EXP10(x) exp((x)*LN10)
  186. #define LOG10(x) (log10(x))
  187.  
  188. /*----------------------------------------------------------------------*/
  189. /*      Macros Defining Limits                                          */
  190. /*----------------------------------------------------------------------*/
  191. #ifdef WIN32
  192. #define MAXALLOC    0x7F000000 /* Largest permissible memory request */
  193. #else
  194. #define MAXALLOC    0x10000 /* Largest permissible memory request */
  195. #endif
  196.  
  197. #endif
  198.